// Class info from spine-unity.dll
// 
using UnityEngine;

namespace Spine.Unity
{
    public struct MeshGeneratorBuffers
    {
        /// <summary>The vertex count that will actually be used for the mesh. The Lengths of the buffer arrays may be larger than this number.</summary>
        public int vertexCount;

        /// <summary> Vertex positions. To be used for UnityEngine.Mesh.vertices.</summary>
        public Vector3[] vertexBuffer;

        /// <summary> Vertex texture coordinates (UVs). To be used for UnityEngine.Mesh.uv.</summary>
        public Vector2[] uvBuffer;

        /// <summary> Vertex colors. To be used for UnityEngine.Mesh.colors32.</summary>
        public Color32[] colorBuffer;

        /// <summary> Optional vertex texture coordinates (UVs), second channel. To be used for UnityEngine.Mesh.uv2.
        /// Using this accessor automatically allocates and resizes the buffer accordingly.</summary>
        public Vector2[] uv2Buffer { get { return meshGenerator.UV2; } }

        /// <summary> Optional vertex texture coordinates (UVs), third channel. To be used for UnityEngine.Mesh.uv3.
        /// Using this accessor automatically allocates and resizes the buffer accordingly.</summary>
        public Vector2[] uv3Buffer { get { return meshGenerator.UV3; } }

        /// <summary> The Spine rendering component's MeshGenerator. </summary>
        public MeshGenerator meshGenerator;
    }
}
